package com.situ.shoplook.common.config;

import com.situ.shoplook.common.util.MethodIncludedKeyGenerator;
import org.springframework.cache.interceptor.KeyGenerator;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableAspectJAutoProxy;

@Configuration
//第1个参数表示暴露出代理对象，强制使用Cglib动态代理
@EnableAspectJAutoProxy(exposeProxy = true, proxyTargetClass = true)
public class WebConfig {
    //创建一个key创建器
    @Bean
    public KeyGenerator myKeyGenerator() {
        return new MethodIncludedKeyGenerator();
    }
}
